package com.sc.nft.feign;
import com.sc.nft.dto.IdRequest;
import com.sc.nft.req.question.WxMiniQuestionPageReq;
import com.sc.nft.req.question.WxMiniQuestionReq;
import com.sc.nft.sup.PageResult;
import com.sc.nft.sup.Result;
import com.sc.nft.vo.question.QuestionDetailsVO;
import com.sc.nft.vo.question.QuestionPageVO;
import com.sc.nft.vo.question.QuestionWebTypeVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;


/**
 * @author JYT
 * @create 2024/4/27 11:29
 */
@FeignClient(name = "meta-mall-mini-app", path = "/wxMiniMall/question")
public interface WxMiniQuestionClient {

    /**
     * 小程序问题创建
     * @param request
     * @return
     */
    @PostMapping(value = "/create", produces = MediaType.APPLICATION_JSON_VALUE)
    Result createQuestion(WxMiniQuestionReq request);


    /**
     * 小程序问题编辑
     * @param request
     * @return
     */
    @PostMapping(value = "/update", produces = MediaType.APPLICATION_JSON_VALUE)
    Result updateQuestion(WxMiniQuestionReq request);

    /**
     * 小程序问题详情
     * @param request
     * @return
     */
    @PostMapping(value = "/details", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<QuestionDetailsVO> questionDetails(IdRequest request);


    /**
     * 小程序问题列表
     * @param request
     * @return
     */
    @PostMapping(value = "/adminPage", produces = MediaType.APPLICATION_JSON_VALUE)
    PageResult<QuestionPageVO> adminPage(WxMiniQuestionPageReq request);


    /**
     * 删除常见问题
     * @param request
     * @return
     */
    @PostMapping(value = "/remove", produces = MediaType.APPLICATION_JSON_VALUE)
    Result removeQuestion(IdRequest request);

    /**
     * 用户端获取常见问题
     * @return
     */
    @PostMapping(value = "/webGet", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<List<QuestionWebTypeVO>> webGet();


}
